﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeEllipCylinder : OdGeSurface
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeEllipCylinder(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeEllipCylinder_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeEllipCylinder obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeEllipCylinder()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeEllipCylinder(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeEllipCylinder() : this(GlobalsPINVOKE.new_OdGeEllipCylinder__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCylinder(OdGeEllipCylinder arg0) : this(GlobalsPINVOKE.new_OdGeEllipCylinder__SWIG_1(OdGeEllipCylinder.getCPtr(arg0)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCylinder(double minorRadius, double majorRadius, OdGePoint3d origin, OdGeVector3d axisOfSymmetry) : this(GlobalsPINVOKE.new_OdGeEllipCylinder__SWIG_2(minorRadius, majorRadius, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(axisOfSymmetry)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCylinder(double minorRadius, double majorRadius, OdGePoint3d origin, OdGeVector3d axisOfSymmetry, OdGeVector3d majorAxis, OdGeInterval height, double startAng, double endAng) : this(GlobalsPINVOKE.new_OdGeEllipCylinder__SWIG_3(minorRadius, majorRadius, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(axisOfSymmetry), OdGeVector3d.getCPtr(majorAxis), OdGeInterval.getCPtr(height), startAng, endAng), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double radiusRatio()
		{
			double result = GlobalsPINVOKE.OdGeEllipCylinder_radiusRatio(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double minorRadius()
		{
			double result = GlobalsPINVOKE.OdGeEllipCylinder_minorRadius(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double majorRadius()
		{
			double result = GlobalsPINVOKE.OdGeEllipCylinder_majorRadius(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d origin()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeEllipCylinder_origin(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getAngles(out double startAng, out double endAng)
		{
			GlobalsPINVOKE.OdGeEllipCylinder_getAngles(this.swigCPtr, out startAng, out endAng);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getHeight(OdGeInterval height)
		{
			GlobalsPINVOKE.OdGeEllipCylinder_getHeight(this.swigCPtr, OdGeInterval.getCPtr(height));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double heightAt(double u)
		{
			double result = GlobalsPINVOKE.OdGeEllipCylinder_heightAt(this.swigCPtr, u);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d axisOfSymmetry()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeEllipCylinder_axisOfSymmetry(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d majorAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeEllipCylinder_majorAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d minorAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeEllipCylinder_minorAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isOuterNormal()
		{
			bool result = GlobalsPINVOKE.OdGeEllipCylinder_isOuterNormal(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isClosed(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeEllipCylinder_isClosed__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isClosed()
		{
			bool result = GlobalsPINVOKE.OdGeEllipCylinder_isClosed__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIsOuterNormal(bool isOuterNormal)
		{
			GlobalsPINVOKE.OdGeEllipCylinder_setIsOuterNormal(this.swigCPtr, isOuterNormal);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeEllipCylinder setMinorRadius(double minorRadius)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_setMinorRadius(this.swigCPtr, minorRadius), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCylinder setMajorRadius(double majorRadius)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_setMajorRadius(this.swigCPtr, majorRadius), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCylinder setAngles(double startAng, double endAng)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_setAngles(this.swigCPtr, startAng, endAng), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCylinder setHeight(OdGeInterval height)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_setHeight(this.swigCPtr, OdGeInterval.getCPtr(height)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCylinder set(double minorRadius, double majorRadius, OdGePoint3d origin, OdGeVector3d axisOfSymmetry)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_set__SWIG_0(this.swigCPtr, minorRadius, majorRadius, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(axisOfSymmetry)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCylinder set(double minorRadius, double majorRadius, OdGePoint3d origin, OdGeVector3d axisOfSymmetry, OdGeVector3d majorAxis, OdGeInterval height, double startAng, double endAng)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_set__SWIG_1(this.swigCPtr, minorRadius, majorRadius, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(axisOfSymmetry), OdGeVector3d.getCPtr(majorAxis), OdGeInterval.getCPtr(height), startAng, endAng), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLinearEnt3d linEnt, out int numInt, OdGePoint3d p1, OdGePoint3d p2, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeEllipCylinder_intersectWith__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(linEnt), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLinearEnt3d linEnt, out int numInt, OdGePoint3d p1, OdGePoint3d p2)
		{
			bool result = GlobalsPINVOKE.OdGeEllipCylinder_intersectWith__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(linEnt), out numInt, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeEllipCylinder Assign(OdGeEllipCylinder arg0)
		{
			OdGeEllipCylinder result = new OdGeEllipCylinder(GlobalsPINVOKE.OdGeEllipCylinder_Assign(this.swigCPtr, OdGeEllipCylinder.getCPtr(arg0)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
